﻿using System;
using System.IO;
using System.Text;
using System.Windows.Forms;
namespace RdpClient
{
	public class Config
	{
		public static RdpInfos RdpInfos;
		public static void Load()
		{
			if (File.Exists(Application.StartupPath + "\\RdpInfos.xml"))
			{
				Config.RdpInfos = SerializationHelper.DeSerialize<RdpInfos>(Application.StartupPath + "\\RdpInfos.xml");
			}
		}
		public static void Save()
		{
			string contents = SerializationHelper.Serialize<RdpInfos>(Config.RdpInfos);
			File.WriteAllText(Application.StartupPath + "\\RdpInfos.xml", contents, Encoding.UTF8);
		}
	}
}
